package com.bdqn.controller;

import com.bdqn.dao.LoginMapper;
import com.bdqn.pojo.UserPojo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@Controller //控制器
public class LoginController {

    @Resource
    LoginMapper user ;

    @ResponseBody
    @RequestMapping("/yesUser")
    public Object yesUser(HttpServletResponse response,String username,String pwd){
        response.setHeader("Access-Control-Allow-Origin","*");

        UserPojo pojo =(UserPojo)user.yesUser(username,pwd);;
       /* if(pojo==null){
            return "no";
        }*/
            return pojo;
    }
}
